using System;
using System.Collections.Generic;
using System.Text;

namespace MarkovsImpl
{
    class WebElements
    {
        private Int32 id;
        private String background;
        private String foreground;
        private String text;
        private String link_vis;
        private String link_not_vis;
        private float number_of_times;
        private float probability;

        public WebElements()
        {
            id = -1;
            background = "";
            foreground = "";
            text = "";
            link_not_vis = "";
            link_vis = "";
            number_of_times = 0;
            probability = 0;
        }

        public WebElements(String bg, String fg, String tx, String lv, String lnv, float num, float prob)
        {
            id = -1;
            background = bg.ToUpper();
            foreground = fg.ToUpper();
            text = tx.ToUpper();
            link_not_vis = lnv.ToUpper();
            link_vis = lv.ToUpper();
            number_of_times = num;
            probability = prob;
        }

        public void setID(Int32 i)
        {
            id = i;
        }

        public Int32 getID()
        {
            return id;
        }

        public void setBackground(String bg)
        {
            background = bg.ToUpper();
        }

        public void setForeground(String fg)
        {
            foreground = fg.ToUpper();
        }

        public void setText(String tx)
        {
            text = tx.ToUpper();
        }

        public void setLinkNotVis(String lnv)
        {
            link_not_vis = lnv.ToUpper();
        }

        public void setLinkVis(String lv)
        {
            link_vis = lv.ToUpper();
        }

        public void setNumberOfTimes(float num)
        {
            number_of_times = num;
        }

        public String getBackground()
        {
            return background;
        }

        public String getForeground()
        {
            return foreground;
        }

        public String getText()
        {
            return text;
        }

        public String getLinkNotVis()
        {
            return link_not_vis;
        }

        public String getLinkVis()
        {
            return link_vis;
        }

        public float getNumberOfTimes()
        {
            return number_of_times;
        }

        public void setProbability(float prob)
        {
            probability = prob;
        }

        public float getProbability()
        {
            return probability;
        }

        public bool Equals(WebElements we)
        {
            if (this.background == we.background &&
                this.foreground == we.foreground &&
                this.text == we.text &&
                this.link_not_vis == we.link_not_vis &&
                this.link_vis == we.link_vis)
                return true;
            else
                return false;
        }

        public override String ToString()
        {
            return "\nBG:  " + background + "\nFG:  " + foreground + "\nTX:  " + text + "\nLNV: " + link_not_vis + "\nLV:  " + link_vis + "\nNUM: " +
                number_of_times.ToString() + "\nPRB: " + probability.ToString();
        }
    }
}
